Understanding Busybox Inittab
=============================

While modifying or creating a custom BSP for the embedded Linux,
one of the many things which needs better understanding is Inittab.
Inittab describes which processes are started during bootup.
It is the job of init to read the inittab file and start
the necessary application. 

Format of each entry in the inittab resembles: 
< id >:< runlevels >:< action >:< process >

Where < id >: The id field is used by BusyBox init to specify
the controlling tty for the specified process.
If BusyBox detects that a serial console is in use,
then the id field is ignored.

< runlevels >: The runlevels field is ignored buy busybox.
Init used in desktop systems also understands runlevels.
However, init which comes with busybox doesn't support runlevels.
If runlevels are needed sysvinit should be used in place init.

< action >: Valid actions include sysinit, respawn, askfirst, wait,
once, restart, ctrlaltdel, and shutdown.

1. sysinit :The process will be executed during system boot.
      It will be executed before any boot or bootwait entries. 
2. respawn :The process will be restarted whenever it terminates 
3. askfirst : The askfirst actions acts just like respawn,
      except that before running the specified process it displays
      the line "Please press Enter to activate this console."
      and then waits for the user to press enter before starting
      the specified process.
4. ctrlaltdel :The process will be executed when init receives
      the SIGINT signal. This means that someone on the system
      console has pressed the CTRL-ALT-DEL key combination.
      Typically one wants to execute some sort of shutdown
      either to get into single-user level or to reboot the machine. 

< process >: Specifies the process to be executed and it's command line.

Few examples from busysybox inittab:
# Boot-time system configuration/initialization script.
# This is run first except when booting in single-user mode.
#
::sysinit:/etc/init.d/rcS

# Put a getty on the serial line (for a terminal)
::respawn:/sbin/getty -L ttyS 115200 vt100

# Stuff to do when restarting the init process
::restart:/sbin/init

# Stuff to do before rebooting
::ctrlaltdel:/sbin/reboot

--
http://linuxembedded.blogspot.com/2006/11/understanding-busybox-inittab.html
--
